<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
  <title>Cling Documentation - Extensions</title>
  <meta name="description" content="Official website of Cling" />
  <meta name="keywords" content="cling, documents, tutorials, howtos, extensions" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta http-equiv="robots" content="noindex,nofollow" />
  <link rel="stylesheet" type="text/css" href="../../style/style.css" />
  <link rel="stylesheet" type="text/css" href="../../style/menu.css" />

</head>

<body>
  <div id="website">
    <div id="header">
      <div id="logo">
        <div id="logo_text">
          <!-- class="logo_colour", allows you to change the colour of the text -->
          <h1><a href="index.html"><span class="logo_colour">Cling</span> Website</a></h1>
          <h2>Interactive Compiler Interface</h2>
        </div>
      </div>
      <div id="mainmenubar">
        <ul id="mainmenu">
          <!-- put class="selected" in the li tag for the selected page - to highlight which page you're on -->
          <li><a class="tab_link" href="../../index.html">Home</a></li>
          <li><a class="tab_link" href="../../download.html">Download</a></li>
          <li><a class="tab_link" href="../../news.html">News</a></li>
          <li class="selected root"><a class="tab_link" href="../../docs.html">Docs</a>
            <div id="secondarymenu">
              <div id="secondarymenu_content">
                <div class="secondarymenu_header">Documentation</div>
                <br class="clear" />
                <div class="column">
                  <div class="column_header">Developer</div>
                  <ul>
                    <li><a class="secm_link" href="doxygen.html">Doxygen</a></li>
                    <li><a class="secm_link" href="extensions.html">Extensions</a></li>
                    <li><a class="secm_link" href="#">Error Recovery</a></li>
                    <li><a class="secm_link" href="#">Late Binding</a></li>
                  </ul>
                </div>
                <div class="column">
                  <div class="column_header">End User</div>
                  <ul>
                    <li><a class="secm_link" href="#">User Manual</a></li>
                    <li><a class="secm_link" href="#">Status of ObjC[++] Support</a></li>
                  </ul>
                </div>

              </div>
            </div>
          </li>
          <li><a class="tab_link" href="../../contact.html">Get Involved</a></li>
        </ul>
      </div>
    </div>
    <div id="breadcrumb"></div>
    <div id="content">
      <div class="sidebar">
        <!-- insert your sidebar items here -->
        <h3>Latest News</h3>
        <h4>Cling goes public</h4>
        <h5>July 25th, 2011</h5>
        <p> Cling was officially announced to the Clang community <br /><a href="news/ClingAnnouncement.html">Read more</a></p>
        <p></p>
        <h4>New website launched</h4>
        <h5>July 1st, 2011</h5>
        <p> Welcome to the new website of the project. <br /><a href="news/NewWebsiteLaunched.html">Read more</a></p>
        <h3>Useful Links</h3>
        <ul>
          <li><a href="www.cern.ch" target="_blank">CERN</a></li>
        </ul>
      </div>
      <div id="main">
        <!-- insert the page content here -->
        <h1>Extensions</h1>
        <p>
          Cling has several additional features. The main reason for their implementation is to improve the interactivity of the prompt. We call them language extensions.
        </p>
          <ul>For instance, language extensions are:
            <li><b>Execution of statements and expressions on the fly</b> - From user's point of view it would make much sense if functions could be called by typing the function name at the prompt. This is true for other handy operations like creation of objects. However, the operations that do it are classified as statements and expressions, entered on the global scope. Statements and expressions on the global scope are not allowed by the C/C++/ObjC/ObjC++ grammar. Cling's prompt allows entering statements and expression on the global scope as transforming them into proper language constructs. </li>
            <li><b>Easy print out of the execution results</b> - The way of signaling that the user wants to see the result of the entered and executed code is done by omitting the semicolon in the end. The standard doesn't allow statements (except those that change the control flow - such as if, for, while) without semicolon (;) in the end. However, this appears to be really simple and useful language extension that improves the user-cling interplay. Imagine if you had to write printf every time that you want to see the result of a function call. </li>
          </ul>
          <div class="see_also">
            See Also:
          </div>
          <div class="see_also_item"><a href="#">Statements and expression on the global scope in details</a></div>
          <div class="see_also_item"><a href="#">Easy printing of execution results in details</a></div>
      </div>
    </div>
    <div id="footer">
      <div id="copyright">
        Copyright &copy; Cling Team
      </div>
      <div id="links">
        <a href="http://root.cern.ch/" target="_blank">The ROOT Framework</a> |
        <a href="http://llvm.org" target="_blank">LLVM</a> |
        <a href="http://clang.llvm.org" target="_blank">Clang</a> |
        <a href="http://www.html5webtemplates.co.uk" target="_blank">Web Design</a>
      </div>
      <div id="modified"><i>Page was modified on <b>$Date$</b> in $Rev: 41615 $ by <b>$Author: vvassilev $</b></i></div>
    </div>
  </div>
</body>
</html>
